/*
 * @Author: xiawei 1243162387@qq.com
 * @Date: 2024-03-28 16:18:50
 * @LastEditors: xiawei 1243162387@qq.com
 * @LastEditTime: 2024-11-30 00:05:02
 */
const { defineConfig } = require('@vue/cli-service')
const packageName = require('./package.json').name;
// import prefixer from 'postcss-prefix-selector';
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port:  process.env.port || 8000,
    // 开发环境允许跨域
    headers: {
      'Access-Control-Allow-Origin': '*',
    },
  },
  // css: {
  //   postcss:{
  //     plugins:[

  //     ]
  //   }
  // },
  
  configureWebpack: {
    output: {
      library: `${packageName}-[name]`,
      libraryTarget: 'umd', // 把微应用打包成 umd 库格式
      chunkLoadingGlobal: `webpackJsonp_${packageName}`, // webpack 5 需要把 jsonpFunction 替换成 chunkLoadingGlobal
    },
  },
})
